﻿using System.Web.Mvc;
using System.Web.Routing;
using Nop.Web.Framework.Localization;
using Nop.Web.Framework.Mvc.Routes;

namespace Nop.Plugin.Widgets.Carousel
{
    public partial class RouteProvider : IRouteProvider
    {
        public void RegisterRoutes(RouteCollection routes)
        {
            routes.MapRoute("Plugin.Widgets.Carousel.List",
                 "Plugins/WidgetsCarousel/List",
                 new { controller = "WidgetsCarousel", action = "List" },
                 new[] { "Nop.Plugin.Widgets.Carousel.Controllers" }
            );

          
        }
        public int Priority
        {
            get
            {
                return 0;
            }
        }
    }

    //public partial class GenericUrlRouteProvider : IRouteProvider
    //{
    //    public void RegisterRoutes(RouteCollection routes)
    //    {

    //        routes.MapLocalizedRoute("Page",
    //                        "{SeName}",
    //                        new { controller = "WidgetsCMS", action = "Page" },
    //                        new[] { "Nop.Plugin.Widgets.CMS.Controllers" });
    //    }

    //    public int Priority
    //    {
    //        get
    //        {
    //            //it should be the last route
    //            //we do not set it to -int.MaxValue so it could be overriden (if required)
    //            return -1000001;
    //        }
    //    }
    //}
}
